1. The Field of the Invention
The present invention relates to systems and methods for backing up data. More particularly, embodiments of the invention relate to systems and methods for backing up data based on the detection of failover events in a database mirroring environment.
2. Related Technology
Database mirroring is a process of synchronizing data between two databases, each of which resides on a respective database server. At any given time in the database mirroring process, one database performs the role of principal database, and the other database performs the role of mirror database. Initially, the data on the mirror database is an exact duplicate of the data on the principal database. As users interact with the database mirroring system, all requests for updates to the data are directed toward the principal database. Each time an update request is performed on the principal database, the same update is automatically performed on the mirror database. Thus, as long as the database mirroring process is functioning properly, the data on the mirror database will continue to be an exact duplicate of the data on the principal database.
Maintaining synchronized copies of a database on two separate servers allows for failover. Failover is a process that automatically switches the “principal” and “mirror” roles of the two databases in a database mirroring environment. After failover, the pre-failover mirror database takes on the role of principal database, and the pre-failover principal database might take on the role of mirror database, if the pre-failover principal database is still available. Thereafter, the mirror database will be continually updated with each update made to the principal database.
Failover is an important fault tolerance function of mission-critical systems that rely on uninterrupted accessibility. Failover is desirable, for example, in the situation where the database server on which the principal database resides becomes unavailable. A database server may become unavailable because of, for example, a hardware or software or network failure. Where failover has occurred because the pre-failover principal database has become unavailable, and due to failover the pre-failover mirror database has been redesignated as the principal database, the data on the mirror database will not be updated with the updates made to the data on the principal database during the time that the mirror database is unavailable. However, once the mirror database becomes available and the mirror relationship is re-established, all updates made to the principal database since failover will automatically be made to the mirror database.
One goal of many failover processes is to make the failover occur as seamlessly as possible from the perspective of the end user, so that the user is not made aware that the pre-failover principal database has become unavailable or that the failover has even occurred. The capacity for automatic failover allows for normal database function despite interruptions caused by problems with the database server where the pre-failover principal database resides. However, failover processes can sometimes present challenges to the implementation of database backup processes that are performed on the principal database.
Data backup in a database mirroring environment is a process that typically involves making a copy of the data stored in the principal database. Data backup makes possible the restoration of the principal and/or mirror databases. For example, in the event that the principal database and mirror database become temporarily or permanently unavailable, the principal and mirror databases can be restored using the copy of the data created during data backup. Systems and methods for performing database backup are typically configured to perform a variety of types of backup to prevent data loss, depending on the state of the database at the time of backup. For example, a failover event can affect the state of the database, which can in turn affect the type of backup which should be performed.
Current database mirroring technology that implements failover does not notify a software application that is run intermittently or on an ad hoc basis that failover has occurred. Since data backup software applications are typically run intermittently instead of continuously, detecting failover is a challenge for intermittently-run data backup software applications.